package com.example.onlinefood.mapper;

import com.example.onlinefood.domain.Restaurant;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RestaurantMapper {
    List<Restaurant> findAll();
    Restaurant findById(@Param("id") Integer id);
    List<Restaurant> searchByName(@Param("keyword") String keyword);
    List<Restaurant> findByCuisineType(@Param("cuisineType") String cuisineType);
    List<Restaurant> findAllOrderBy(@Param("sortBy") String sortBy, @Param("order") String order);
    int update(Restaurant restaurant);
}


